package main

import (
	"gitee.com/zaper/service-center/common_config"
	"gitee.com/zaper/service-center/logconfig"
	"gitee.com/zaper/service-center/os_env"
	"gitee.com/zaper/service-center/register"
	"gitee.com/zaper/service-center/router"
	"gitee.com/zaper/software-framework/util"
)

func main() {
	//if err := os.Setenv(ResisterCenterKey, ResisterCenterValue); err != nil {
	//	logger.Errorf("set AppNameSpaceKey env fail, err is %s", err)
	//}
	//pprofMux := http.NewServeMux()
	//pprofMux.HandleFunc("/debug/pprof/", pprof.Index) // 显式注册路由
	//pprofServer := &http.Server{
	//	Addr:    ":6060",
	//	Handler: pprofMux,
	//}
	//go func() {
	//	if err := pprofServer.ListenAndServe(); err != nil {
	//		fmt.Printf("%v", err)
	//	}
	//}()
	_ = logconfig.InitializeLog()
	os_env.InitializeEnv()
	router.InitializeRegister()
	register.InitializeNginxConf()
	common_config.InitializeConfigService()
	util.GetSystemSignalMonitor().Monitor()
}
